package com.hdz.audiocomparedemo.utils;

import android.content.Context;
import android.os.Environment;
import android.widget.Toast;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author hdz
 * @date 2018/12/1 10:38
 */
public class Util {

    public static String getOutFilePath() {
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd_HHmmss");
        return Environment.getExternalStorageDirectory().getAbsolutePath() + "/audioScore/" + df.format(new Date()) + ".pcm";
    }

    public static void showToast(Context context, String msg) {
        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    }
}
